import java.util.Queue;
import java.util.LinkedList;
import java.util.ArrayList;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86187
 * Date: 2022-10-03
 * Time: 20:49
 */

public class Tes {


    /**
     public class TreeNode {
     int val = 0;
     TreeNode left = null;
     TreeNode right = null;

     public TreeNode(int val) {
     this.val = val;
     }

     }
     */

    /*
    public class Solution {
        public ArrayList<Integer> PrintFromTopToBottom(TreeNode root) {
            ArrayList<Integer> result = new ArrayList<>();

            if(root == null){
                return result;
            }

            Queue<TreeNode> q = new LinkedList<>();


            q.offer(root);
            while(!q.isEmpty()){
                TreeNode father = q.poll();
                result.add(father.val);

                if(father.left != null){
                    q.offer(father.left);
                }
                if(father.right != null){
                    q.offer(father.right);
                }
            }

            return result;
        }
    }


     */

}
